import java.util.Scanner;

public class d049 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String input, output;
		int adYear;
		int taiwanerYear;
		
		while(sc.hasNext()) {
			input = sc.nextLine();
			adYear = Integer.parseInt(input);
			
			taiwanerYear = adYear - 1911;
			
			output = Integer.toString(taiwanerYear);
			
			System.out.println(output);
		}
	}
}